package cn.calm.osgi.admin.bundle.entity;

public class BundleInfo {
	private int state;
	private String symbolicName;
	private String version;
	private Boolean struts2Enabled;
	private byte[] content;
	private String bundleFilename;
	public int getState() {
		return state;
	}

	public void setState(int state) {
		this.state = state;
	}

	public String getSymbolicName() {
		return symbolicName;
	}

	public void setSymbolicName(String symbolicName) {
		this.symbolicName = symbolicName;
	}

	public String getVersion() {
		return version;
	}

	public void setVersion(String version) {
		this.version = version;
	}

	public Boolean getStruts2Enabled() {
		return struts2Enabled;
	}

	public void setStruts2Enabled(Boolean struts2Enabled) {
		this.struts2Enabled = struts2Enabled;
	}

	public byte[] getContent() {
		return content;
	}

	public void setContent(byte[] content) {
		this.content = content;
	}

	public String getBundleFilename() {
		return bundleFilename;
	}

	public void setBundleFilename(String bundleFilename) {
		this.bundleFilename = bundleFilename;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((symbolicName == null) ? 0 : symbolicName.hashCode());
		result = prime * result + ((version == null) ? 0 : version.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		BundleInfo other = (BundleInfo) obj;
		if (symbolicName == null) {
			if (other.symbolicName != null)
				return false;
		} else if (!symbolicName.equals(other.symbolicName))
			return false;
		if (version == null) {
			if (other.version != null)
				return false;
		} else if (!version.equals(other.version))
			return false;
		return true;
	}
	
}
